home *** CD-ROM | disk | FTP | other *** search
- ED Regular Expressions
- ======================
-
- Regular expressions comprise the following:- (descending order of precedence)
-
- c any non-special character `c' matches itself
- \c turns off any special meaning of character `c'
- ^ beginning of line
- $ end of line
- ? any single character
- * any number of characters
- [...] any one of characters in ...
- [!...] any single character not in ...
- - range separator inside a class. [a-z0-9]
- :s set of characters in `s'. where s is
- a - alpha, d - digit, n - alphanumeric, - white space
- r@ zero or more occurrences of `r'
- r+ one or more occurrences of `r'
- r- zero or one occurrence of `r'
- r1r2 r1 followed by r2
- r1|r2 r1 or r2
- (r) regular expression - may be nested
- {r} tagged regular expression - substitute in replace
-
- To access the tagged portion of a regular expression use $n in the
- replacement string where 'n' is a single digit between 1 - 9. For
- example $1 is substituted by the first tagged expression, $2 by the
- second and so forth.
-
-
- Searching for Tabs and other control characters.
-
- To search for control characters as well as characters of any Ascii
- value use the following escapes:
-
- \t Tab
- \f Formfeed
- \r Carriage Return
- \b Backspace
- \nnn Where 'nnn' is the 3 digit decimal value of the required
- character.
-
- eg. Find "^\t" will find lines starting with a Tab.
- Find "fred\255and" will find the string "fred" followed by a
- character with the decimal value 255, followed by "and".
-
- These escape strings can also be used in Replace strings.
-
- Note: The escape strings only have a special meaning if the Regular
- expression search option is turned on.
-
-
- See Regular Expressions in the Reference Guide for further information.
-